package com.schoolinfo.model;
// default package

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * SecondClass entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="secondclass"
)

public class SecondClass  implements java.io.Serializable {


    // Fields    

     private Integer id;
  //   private FirstClass firstClass;
     private String name;
   //  private Set<Goods> goodses = new HashSet<Goods>(0);

     private Integer firstId;
    // Constructors

     @Column(name="firstId")
    public Integer getFirstId() {
		return firstId;
	}

	public void setFirstId(Integer firstId) {
		this.firstId = firstId;
	}

	/** default constructor */
    public SecondClass() {
    }

	/** minimal constructor */
    public SecondClass(String name) {
      //  this.firstClass = firstClass;
        this.name = name;
    }
    
   
   
    // Property accessors
    @Id @GeneratedValue
    
    @Column(name="id", unique=true, nullable=false)

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /*	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="firstId", nullable=false)

   public FirstClass getFirstClass() {
        return this.firstClass;
    }
    
    public void setFirstClass(FirstClass firstClass) {
        this.firstClass = firstClass;
    }*/
    
    @Column(name="name", nullable=false, length=50)

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    /*
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="secondClass")

  public Set<Goods> getGoodses() {
        return this.goodses;
    }
    
    public void setGoodses(Set<Goods> goodses) {
        this.goodses = goodses;
    }*/
   








}